import { useRoutes } from 'react-router-dom'
import React, { Suspense } from 'react'
import { routes } from './routes'

const RouterView = () => useRoutes(routes)
const Router = () => {
  return (
    <Suspense fallback={<div>路由加载中...</div>}>
      <RouterView></RouterView>
    </Suspense>
  )
}

export default Router